package com.cc.user.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.cc.user.entity.EmployeeCustomerEntity;
import com.cc.user.entity.UserEntity;
import com.cc.user.vo.*;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 
 * 
 * @author leifengyang
 * @email leifengyang@gmail.com
 * @date 2020-12-11 11:30:58
 */
@Mapper
public interface EmployeeCustomerDao extends BaseMapper<EmployeeCustomerEntity> {

    //通过客户id获取对应的业务员
    UserEntity selectByCid(@Param("cid") Long cid);

    List<CustomerVo> getAllCustomers(Long eid);

    CustomerDetailVo getCustomerDetailByCid(Long cid);

    List<CustomerVo> getCustomersByPhoneOrName(Long eid, String condition);

    List<EmployeeCustomerVo> getEmployeesCustomers(String empMobile, String cusMobile);

    List<OfflineOrderNewVo> getCustomerDetailByEidCid(Long eid, Long cid);

    List<OfflineOrderProductNewVo> getOfflineOrderProductsById(Long ooid);
}
